package com.dense.kuiniu.bookborrow.utils;

import com.dense.kuiniu.bookborrow.R;

import java.util.Random;

/**
 * @author Administrator
 * @date 2021/1/29
 */
public class RandomCoverUtils {
    private static int[] randomCover = new int[4];
    static {
        randomCover[0] = R.mipmap.bg_cover_1;
        randomCover[1] = R.mipmap.bg_cover_2;
        randomCover[2] = R.mipmap.bg_cover_3;
    }
    public static int getRandomCover() {
        Random ran = new Random();
        return randomCover[ran.nextInt(3)];
    }

} 